package com.kgc.basic.remote;

import com.kgc.basic.pojo.Customer;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface CustomerRemote {

    @RequestMapping("/selectCustomerByPage")
    @ResponseBody
    ResponseMsg selectCustomerByPage(@RequestBody Map<String, Object> map);

    @RequestMapping("/insertCustomer")
    @ResponseBody
    ResponseMsg insertCustomer(@RequestBody Customer customer);

    @RequestMapping("/updateCustomer")
    @ResponseBody
    ResponseMsg updateCustomer(@RequestBody Customer customer);

    @RequestMapping("/deleteCustomer")
    @ResponseBody
    ResponseMsg deleteCustomer(@RequestParam("id") int id);

    //校验编码是否重复
    @RequestMapping("selectCustomerByCode")
    @ResponseBody
    ResponseMsg selectCustomerByCode(@RequestParam("code") String code);

    //查询所有客户
    @RequestMapping("selectAllCustomer")
    @ResponseBody
    ResponseMsg selectAllCustomer();

    //
    @RequestMapping("getAllCustomerByData")
    @ResponseBody
    ResponseMsg getAllCustomerByData();

}
